home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / amos / amoslist-0195.lzh / AMOSLIST / text0251.txt < prev    next >
Encoding:
Text File  |  1995-02-01  |  907 b   |  40 lines

  1. > Gr writing 2
  2. > box 10,10 to 20,20
  3. > box 10,10 to 20,20
  4. > gr writing 1
  5. > One garbage pixel is left at 10,10. Why?
  6.  
  7. Because the point (10,10) is plotted twice by the Box command.  It's 
  8. equivalent to doing
  9.  
  10. Plot 10,10 : Draw To 20,10 To 20,20 To 10,20 To 10,10
  11.  
  12. so logical operators like XOR mess up.  (The first Box command clears the 
  13. point (10,10), and then when it's Xored again things get messy.  Write 
  14. your own procedure like so :
  15.  
  16. Procedure _BOX[X1,Y1,X2,Y2]
  17.  
  18.   ' This checks which way you should stop short...
  19.  
  20.   If Y1<Y2
  21.     O=-1
  22.   Else
  23.     O=1
  24.   End If
  25.  
  26.   Plot X1,Y1 : Draw To X2,Y1 To X2,Y2 To X1,Y2 to X1,Y2+O
  27.  
  28. EndProc
  29.  
  30. Hope this helps...
  31.  
  32. --
  33. GCS -d+ H+ s++:- g+ p? !au a- w+++            !Productions 1995
  34. v* C+++ UB+++A++++ P++ L++ E+ N+++       http://satelnet.org/~mentat/
  35. K+ !W--- M-- V po- Y+ t++ 5+ jx G?
  36. R tv++ D- B--- e+ u** h f r++ !n y+ "No matter where you go, there you are."
  37.  
  38.  
  39.